<%@ page import="com.yyyzzz.DAO.impl.teacherDaoimpl" %>
<%@ page import="com.yyyzzz.bean.Teacher" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.ArrayList" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %><%--
  Created by IntelliJ IDEA.
  User: ZY
  Date: 2021/12/9
  Time: 23:53
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>修改教师个人信息</title>
    <script type="text/javascript" src="js/jquery.1.8.0.min.js"></script>
    <link href="courseInfo/courseInfo.css" rel="stylesheet" type="text/css">
</head>
<body>
<header>
    <a href="#" class="logo">学生选课系统</a>
    <ul>
        <li>
            <a href="studentMain.jsp">可选课程</a>
        </li>
        <li><a href="chooseCourse.jsp">已选课表</a>
        </li>
        <li><a href="#" class="active">修改个人信息</a>
        </li>
        <li><a href="#"></a>
        </li>
    </ul>
</header>
<section>
    <img src="Login/stars.png" id="stars">
    <img src="Login/moon.png" id="moon">
    <img src="Login/mountainsbehind.png" id="mountains_behind">
    <img src="Login/mountainsfront.png" id="mountains_front">
</section>
<div class="main1">
    <%--    <%
            Object obj =  request.getAttribute ("list");
            if(obj!=null){
               List<Teacher> teacherList=(List) obj;
            }
           for (Teacher teacher:){

           }
        %>--%>
    <h1>修改教师个人信息</h1>
    <%
        Teacher teacher = (Teacher) session.getAttribute ("teacher");
        List<String> list = new ArrayList<> ();
        list.add (teacher.getTeachername ());
        list.add (teacher.getTeacherpassword ());
        list.add (teacher.getTeacherjob ());
        list.add (teacher.getSex ());
        System.out.println ("teachermodify.jsp" + teacher);
        System.out.println (list.get (0));
    %>
    <form id="teacherForm" name="teacherForm" method="post" action="modify">
        <div>教师名称<input type="text" id="teacherName" name="teacherName" value="<%=list.get(0)%>"
                        style="margin-left: 17px;margin-bottom:5px; margin-top: 30px;">
        </div>
        <div>
            教师密码 <input type="password" id="teacherPwd" name="pwd" value="<%=list.get (1)%>"
                        style="margin-left: 17px;margin-bottom:5px;">
        </div>

        <div>
            教师所受课程<input type="text" name="job" id="teacherjob" value="<%=list.get(2)%>" style="margin-bottom: 5px;">
        </div>
        <div>
            教师性别<input type=" text" name="sex" id="teacherSex" value="<%=list.get (3)%>">
        </div>
        <div>
            <input type="submit">
        </div>
    </form>
</div>
<script type="text/javascript">
</script>
</body>
</html>
